<template>
  <el-table
    :data="listData"
    style="width: 100%"
    :height="tableHeight" id="el-table-view">
    <el-table-column
      prop="name"
      label="姓名"
      >
    </el-table-column>
    <el-table-column
      prop="fileTypeDescription"
      label="文件类型">
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    name: "FileViewTable",
    data() {
      return {
        tableHeight: 700,
        tableData: []
      }
    },
    methods: {
      //加载数据


    },
    mounted() {
      let allHeight = document.documentElement.clientHeight
      let top = document.body.scrollTop || document.documentElement.scrollTop
      console.log(allHeight)
      console.log(top)


      let offsetTop = document.getElementById('el-table-view').offsetTop;
      console.log(offsetTop)
      this.tableHeight = allHeight - offsetTop - 10;
    },
    props: {
      listData: {
        type: Array,
        default: function() {
          return [];
        }
      }
    }
  }
</script>

<style scoped>

</style>
